<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions">

<f:view contentType="text/html">
	<h:body>
		<h:form id="formMenu">
			<div id="columna1">
				<p:panel id="panelbarra" rendered="#{sesionBean.haySesion()}"
					style="background:none;border:none;width:50%;padding:0px;margin:0px">


					<p:menubar style="padding-top:5px;width:50%;border:none"
						rendered="#{sesionBean.haySesion()}">


						<p:submenu rendered="#{sesionBean.rol=='administrador'}">
							<p:menuitem value="#{msj['menu.registro']}"
								url="/secured/administrador/realizar_reservas_telefonicas.jsf?faces-redirect=true" />
							<p:menuitem value="opcion2" />
						</p:submenu>
					</p:menubar>
				</p:panel>
			</div>
			<div id="columna2">
				<p:panel style="background:none;border:none;"
					rendered="#{sesionBean.haySesion()}">
					<h:panelGrid columns="2">
						<h:panelGrid columns="2">
							<h:outputText
								value="#{sesionBean.persona.nombre}   #{sesionBean.persona.apellido}" />

						</h:panelGrid>
						<h:panelGrid columns="3">
							<p:commandLink value="#{msj['menu.salir']}"
								action="#{sesionBean.logOut()}" ajax="false" type="submit" />
							|
							<p:commandLink value="#{msj['msj.Inicio']}"
								rendered="#{sesionBean.persona!=null}"
								action="#{sesionBean.irAInicio()}" ajax="false" type="submit" />
						</h:panelGrid>
					</h:panelGrid>

				</p:panel>

				<p:panel id="panellogin" rendered="#{sesionBean.haySesion()==false}"
					style="background:none;border:none;">
					<h:panelGrid columns="2">
						<h:panelGrid columns="2">
							<h:outputText value="#{msj['msj.usuario']}: " style="color:white" />
							<h:inputText id="tfusuario" value="#{sesionBean.usuario}" />
							<h:outputText value="#{msj['msj.contrasena']}: "
								style="color:white" />
							<h:inputSecret id="tfpass" value="#{sesionBean.password}" />
						</h:panelGrid>
						<p:commandButton value="#{msj['msj.login']}" style="height:25px"
							action="#{sesionBean.login()}" process="panellogin" ajax="false"
							type="submit" />
					</h:panelGrid>
				</p:panel>
			</div>
		</h:form>
	</h:body>
</f:view>
</html>
